import React, { Component } from 'react';

class List extends Component {
   
    render() {
        const strs = this.props.list||[];
        
        const listItems = strs.map((str,index) =>
          <li key={index}>{str.text}</li>
        );
        return (
            <ul>
               {listItems}
            </ul>
        );
    }
}

export default List;